package ro.gateway.aida.obj;

/**
 * Created by IntelliJ IDEA. User: xblue Date: Jan 6, 2004 Time: 11:57:15 AM To change this template use Options | File
 * Templates.
 */
public class CRegion {
     private int id = -1;
     private String name;
     private GeoData geo_data;
     private String code;
     private int parent_id = -1;
     private CRegion[] children;

     public String getListname() {
          if ( parent_id != -1 ) {
               return " -- " + name;
          } else {
               return name;
          }
     }

     public CRegion[] getChildren() {
          return children;
     }

     public void setChildren( CRegion[] children ) {
          this.children = children;
     }

     public int getParent_id() {
          return parent_id;
     }

     public void setParent_id( int parent_id ) {
          this.parent_id = parent_id;
     }

     public CRegion() {
          geo_data = new GeoData();
     }

     public GeoData getGeo_data() {
          return geo_data;
     }

     public void setGeo_data( GeoData geo_data ) {
          this.geo_data = geo_data;
     }

     public int getId() {
          return id;
     }

     public void setId( int id ) {
          this.id = id;
     }

     public String getName() {
          return name;
     }

     public void setName( String name ) {
          this.name = name;
     }

     /**
      * @return Returns the code.
      */
     public String getCode() {
          return code;
     }

     /**
      * @param code The code to set.
      */
     public void setCode( String code ) {
          this.code = code;
     }
}
